package com.example.fina2202.day10;

import java.util.LinkedList;
import java.util.Queue;

public class QueueDemo {
    public static void main(String[] args) {
        //创建Queue对象
        Queue<Integer> queue = new LinkedList<>();
        //通过offer入队元素
        queue.offer(23);
        queue.offer(12);
        queue.offer(0);
        queue.offer(3);
        queue.offer(2);

        Integer ele = queue.peek();
        System.out.println(ele);
        System.out.println(queue);

//        for (int i=0;i<6;i++){
//            Integer ele = queue.poll();
//            System.out.println(ele);
//        }
    }
}
